
import { postRequest, getRequest } from '/@/lib/axios';

export const projectDailyReportApi = {

  //通过项目编号查询项目
  getProject: (projectCode) => {
    return getRequest(`/project/byCode/${projectCode}`);///project/byCode/{projectCode}")
  },

  //外包员工下拉
  queryAllByGroupLeaderId: () => {
    return getRequest(`/outsourcingPersonnel/queryAllByGroupLeaderId`);
  },
  // 日报提交
  onSubmit: (data) => {
    return postRequest(`/timesheetBase/add`,data);
  },
  // 修改注意事项
  setHtml: (data) => {
    return postRequest(`/announcements/save`,data);
  },
  // 获取注意事项
  getHtml:() => {
    return getRequest(`/announcements/read`);
  },
  // 日报查询列表
  list:(param)=>{
    return postRequest(`/timesheetBase/queryPage`,param);
  },
  // 项目下拉/project/queryAll
  getProjectOptions:()=>{
    return postRequest(`/project/queryAll`);
  },
  
  approve:(id) => {
    return getRequest(`/timesheet/approve/${id}`);
  },
  notApprove:(param) => {
    return getRequest(`/timesheet/notApprove/`,param);
  },
};
